<?php
class SearchPlace extends Controller{

	function __construct() {
		parent::__construct();
	}

	
	function index()
	{
		$this->view->render('Page/search_place');
	}

	public function search_by_key()
	{
		$key = "";
		if(isset($_POST['search_place'])) { $key = trim($_POST['search_place']) ; }
		
		$this->view->list_place = $this->model->get_product_search_by_key( $key );
		$this->view->model = $this->model;
		$this->view->render('Page/SearchPlace');
	}

	public function get_all_wifi(){

		echo json_encode($this->model->get_all_wifi($_POST['place_id']));
	}
}
?>